import {createRouter, createWebHistory} from 'vue-router'
import Home from '@/views/HomeView.vue'

const router = createRouter({
    history: createWebHistory(import.meta.env.BASE_URL),
    routes: [
        {
            path: '/',
            name: 'home',
            component: Home
        },
        {
            path: '/shopCar',
            name: 'shopCar',
            component: () => import('../views/ShopCarView.vue')
        },
        {
            path: '/my',
            name: 'my',
            component: () => import('../views/MyView.vue')
        },
        {
            path: '/category',
            name: 'category',
            component: () => import('../views/CategoryView.vue')
        },
        {
            path: '/detail/:id',
            name: 'detail',
            component: () => import('../views/DetailView.vue'),
        }
    ]
})

export default router
